﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Movie.Master" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="MovieWebApp.Pages.Home" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Label ID="homeLabel" runat="server" Text="<%$Resources:WebResources, FeatureTitle %>" />
<table>
    <tr><td>
<asp:DataList RepeatLayout = "Table" RepeatColumns = "3" CellPadding = "40"
    RepeatDirection = "Horizontal" ItemStyle-BorderStyle = "Double"
    runat = "server" ID = "pList" 
        onselectedindexchanged="pList_SelectedIndexChanged">
        <ItemTemplate>
        
        <asp:Image ID = "mveImage" runat = "server"
         ImageUrl = '<%# Eval("movieImage", "~/Images/{0}") %>'/><br />
        
        <%# DataBinder.Eval(Container.DataItem, "movieTitle") %><br />
        <%# DataBinder.Eval(Container.DataItem, "movieDesc") %><br />
        <%# String.Format("{0:c}",Convert.ToDecimal
        (DataBinder.Eval(Container.DataItem, "listPrice")))%><br />  
<asp:LinkButton ID = "AddToCart" CommandName = '<%#Container.ItemIndex %>' 
    runat = "server" OnClick = "AddToCartLink">Add To Cart</asp:LinkButton>       
        </ItemTemplate>
</asp:DataList>
</td></tr></table>
</asp:Content>
